﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Runtime.Serialization;

namespace DTO
{
    [DataContract]
    [KnownType(typeof(AdmTerm))]
    [KnownType(typeof(Term))]
    public class TermBase: DTOBase
    {
        [DataMember]
        public int IDTerm { get; set; }

        [DataMember]
        public DateTime Start { get; set; }

        [DataMember]
        public DateTime Stop { get; set; }

        [DataMember]
        public DateTime? StartFill { get; set; }

        [DataMember]
        public DateTime? StopFill { get; set; }

        [DataMember]
        public int IDOrganization { get; set; }

        [DataMember]
        public int IDPeriod { get; set; }
    }

    [DataContract]
    [KnownType(typeof(Organization))]
    public class OrganizationBase : DTOBase
    {
        [DataMember]
        public int IDOrganization { get; set; }

        [DataMember]
        public string Name { get; set; }

        [DataMember]
        public string Abbriviation { get; set; }
    }
    
    [DataContract]
    [KnownType(typeof(Period))]
    public class PeriodBase : DTOBase
    {
        [DataMember]
        public int IDPeriod { get; set; }

        [DataMember]
        public DateTime? Start { get; set; }

        [DataMember]
        public DateTime? Stop { get; set; }
    }
}
